package com.weibo.business.servlet;

import java.io.IOException;
import java.io.PrintWriter;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.log4j.Logger;

import com.weibo.common.ValidateUserServlet;
import com.weibo.user.User;
import com.weibo.user.service.UserService;
import com.weibo.user.service.imp.UserServiceImp;

public class BillingChargeServlet extends ValidateUserServlet {
	private static Logger logger = Logger.getLogger(BillingChargeServlet.class);

	@Override
	public void doService(HttpServletRequest request,
			HttpServletResponse response) {
		logger.info("BillingChargeServlet被请求了！");
		try {
			PrintWriter out = response.getWriter();
			String jine = request.getParameter("jine");
			String name = request.getParameter("name");
			
			UserService userService=new UserServiceImp();
			if(userService.addUserYue(name,jine)){
				out.print(true);
			}else{
				out.print(false);
			}
		} catch (IOException e) {
			logger.error(e);
		}
	}

}
